﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (ConfigurationManager.AppSettings.GetValues("poster1")[0].ToString() != "")
        {
            this.btnPoster1.ImageUrl = ConfigurationManager.AppSettings.GetValues("poster1")[0].ToString();
            this.btnPoster1.PostBackUrl="PosterPic.aspx?pic=" + ConfigurationManager.AppSettings.GetValues("poster1")[0].ToString();
        }
        else
            this.btnPoster1.Visible = false;

        if (ConfigurationManager.AppSettings.GetValues("poster2")[0].ToString() != "")
        {
            this.btnPoster2.ImageUrl = ConfigurationManager.AppSettings.GetValues("poster2")[0].ToString();
            this.btnPoster2.PostBackUrl = "PosterPic.aspx?pic=" + ConfigurationManager.AppSettings.GetValues("poster2")[0].ToString();
        }
        else
            this.btnPoster2.Visible = false;

        if (ConfigurationManager.AppSettings.GetValues("poster3")[0].ToString() != "")
        {
            this.btnPoster3.ImageUrl = ConfigurationManager.AppSettings.GetValues("poster3")[0].ToString();
            this.btnPoster3.PostBackUrl = "PosterPic.aspx?pic=" + ConfigurationManager.AppSettings.GetValues("poster3")[0].ToString();
        }
        else
            this.btnPoster3.Visible = false;

        if (ConfigurationManager.AppSettings.GetValues("poster4")[0].ToString() != "")
        {
            this.btnPoster4.ImageUrl = ConfigurationManager.AppSettings.GetValues("poster4")[0].ToString();
            this.btnPoster4.PostBackUrl = "PosterPic.aspx?pic=" + ConfigurationManager.AppSettings.GetValues("poster4")[0].ToString();
        }
        else
            this.btnPoster4.Visible = false;

    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        //trang chu
        Response.Redirect("Default.aspx");
    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        //lich chieu
        //System.IO.StreamReader sr = new System.IO.StreamReader(Server.MapPath("App_Data\\lichchieu.dat"));
        //Response.Write("<script type='text/javascript'>alert('" + sr.ReadLine() + "')</script>");
        Response.Redirect("LichChieu.aspx");
    }
    protected void LinkButton3_Click(object sender, EventArgs e)
    {
        //map
        Response.Redirect("Map.aspx");
    }
    protected void LinkButton4_Click(object sender, EventArgs e)
    {
        //gia ve 
        Response.Redirect("GiaVe.aspx");
    }
    protected void LinkButton5_Click(object sender, EventArgs e)
    {
        //sap chieu
        Response.Redirect("SapChieu.aspx");
    }
    protected void menu_index_Click(object sender, EventArgs e)
    {
        Response.Redirect("Default.aspx");
    }
    protected void menu_sukien_Click(object sender, EventArgs e)
    {
        Response.Redirect("Sukien.aspx");
    }
    protected void vn_Click(object sender, ImageClickEventArgs e)
    {
        //string strurl = this.Request.Url.AbsolutePath;
        //Response.Redirect(this.Request.Url.AbsolutePath);
    }
    protected void en_Click(object sender, ImageClickEventArgs e)
    {
        string strurl = this.Request.Url.AbsolutePath;
        strurl = strurl.Insert(strurl.Length - 5, "_eng");
        Response.Redirect(strurl);
    }
    protected void myHome_Click(object sender, EventArgs e)
    {
        Response.Redirect("myhome.aspx");
    }
    protected void FestivalFilm_Click(object sender, EventArgs e)
    {
        Response.Redirect("index.html");
    }
}
